package com.sinven.service;

import com.sinven.common.ActionResult;
import com.sinven.common.Pager;
import com.sinven.pojo.Article;
import com.sinven.vo.ArticleCondition;

import java.util.List;

public interface ArticleService {
    long countArticle(int categoryId);

    ActionResult<List<Article>> queryArticles(String code, Integer page, int pageSize);

    boolean updateArticle(Article article);

    boolean addArticle(Article article);

    boolean deleteArticle(long articleId);

    Article queryArticle(long articleId);

    List<Article> queryArticleByCondition(ArticleCondition condition);

    Pager<Article> queryArticles(String code,Long page);

    /**
     * 查询首页推荐活动
     * @return
     */
    List<Article> queryIndexActivity();
}
